package pers.litao.bit.commons.utils;

/**
 * 常量
 *
 *
 */
public class Constant {
    /**
     * 商品列表分页长度
     */
    public static final long SIZE = 8L;
    /**
     * 首页热门商品分页长度
     */
    public static final long HOT_SIZE = 4L;
    /**
     * 首页最新商品分页长度
     */
    public static final long NEW_SIZE = 4L;
    /**
     * 用户商品分页长度
     */
    public static final long USER_LIST_SIZE = 9L;
    /**
     * 推荐分页长度
     */
    public static final long DETAILED_RECOMMENDED_SIZE = 3L;
    /**
     * 零售商订单分页长度
     */
    public static final long RETAIL_ORDER_SIZE = 11L;
    /**
     * 供应商订单分页长度
     */
    public static final long SUPPLIER_ORDER_SIZE = 11L;
    /**
     * 供应商订单配送分页长度
     */
    public static final long DISTRIBUTION_SIZE = 17L;
    /**
     * 资讯页数
     */
    public static final long INFORMATION_SIZE = 3L;
    /**
     * 注册时发送验证码的类型
     */
    public static final Integer CHECK_TYPE_REG_USERINFO = 1;
    /**
     * 更新密码时发送验证码的类型
     */
    public static final Integer CHECK_TYPE_UPDATE_PASSWORD = 2;
    /**
     * 注册时验证码模板
     *
     * 您正在申请手机注册碧涛供销平台账号，验证码为：${code}，2分钟内有效！感谢您的支持！
     */
    public static final String REG_USERINFO_TEMPLATE = "SMS_205815930";
    /**
     * 更改密码时验证码模板
     *
     * 您正在更新登陆密码，验证码为：${code}，2分钟内有效！感谢您的支持！
     */
    public static final String UPDATE_PASSWORD_TEMPLATE = "SMS_205815930";
    /**
     * 返回代码
     */
    public enum ResponseCode{
        SUBMIT_DATA_ILLEGALITY(300,"提交的数据不合法"),
        LOGIN_NOT_USER(400,"请输入账号或密码"),
        ERROR_USER_NOT_EXIST(401,"用户不存在"),
        ERROR_USER_WRONG_PASSWORD(402,"密码错误"),
        ERROR_USER_EXIST(403,"用户已存在,请更换账号注册"),
        RETAIL_NOT_RELEASE_GODDS(405,"零售商不能发布商品"),
        SUPPLIER_CANT_PAYGOODS(406,"供应商不能买商品"),
        SUPPLIER_CANT_PROFIT_AND_LOSS(407,"供应商没有盈亏统计"),
        SUPPLIER_CANT_FUNNEL(408,"供应商没有漏斗图销售统计"),
        SUPPLIER_API(409,"该接口为供应商接口"),
        RETAIL_API(410,"该接口为零售商接口"),
        TOKEM_INVALID(450,"token失效"),
        NOT_TOKEN(451,"未登录，无法操作"),
        NO_PERMISSION(452,"没有权限"),
        ILLEGAL_OPERATION(453,"非法操作"),
        KEY_ERROR(460,"验证码错误"),
        KEY_IS_SEND(461,"验证码已发送,请检查"),
        SERVER_EXCEPTION(500,"服务器异常");
        private int code;
        private String msg;
        ResponseCode(int code,String msg){
            this.code = code;
            this.msg = msg;
        }
        public int getCode(){
            return code;
        }
        public String getMsg(){
            return msg;
        }
    }

}
